package com.taskmanagement.mapper;

import com.taskmanagement.entity.Step;
import org.apache.ibatis.annotations.Mapper;

import java.math.BigInteger;
import java.util.List;
import java.util.Date;

@Mapper
public interface StepMapper {

    List<Step> findByTaskId(BigInteger taskId);

    Step findById(BigInteger id);

    int insert(Step step);

    int update(Step step);

    int delete(BigInteger id);

    int updateStatus(BigInteger id, Boolean isCompleted, Date actualEndDate);

    int countByTaskId(BigInteger taskId);

    int countCompletedByTaskId(BigInteger taskId);
}
